package com.lijy.thread;

import java.util.Arrays;
import org.junit.Test;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

/**
 * @author Lijingyu on 2017/6/15.
 */
public class TestThread {
  static  ConcurrentMap<String,String> map = new ConcurrentHashMap<String,String>();
//    static Map<String,String> map = new HashMap<String, String>();

    @Test
    public void testThread(){

        Thread t = new Thread(){
            @Override
            public void run() {
                map.put("3", "33");
            }
        };
        Thread t1 = new Thread("Thread2"){
            @Override
            public void run() {
                map.put("4", "44");
            }
        };

        Thread t2 = new Thread("Thread3"){
            @Override
            public void run() {
                map.put("5", "55");
            }
        };
        t.start();
        t1.start();
        t2.start();
        System.out.println(map);
    }

    public static void main(String[] args) {
        String path = System.getProperty("sun.boot.class.path");
        String[] splits = path.split("\\;");
        for (String split : splits) {
            System.out.println(split);
        }
        System.out.println();
        System.out.println(System.getProperty("java.ext.dirs"));

    }
}
